<?php
include("inc/head.php");
$Templates = getTemplates();

?>
<style>
ul, li {padding:0;margin:0}
a, a.visited {text-decoration:none}
</style>
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
<!--
var noHelp   = "<p align='center' style='color: #666'>暂时还没有该部分内容</p>";
var helpLang = "zh_cn";
//-->
</script>

<style type="text/css">
BODY {
	BACKGROUND: #D8E9F8
}
#tabbar-div {
	PADDING-LEFT: 10px; BACKGROUND: #D8E9F8; PADDING-TOP: 0px; HEIGHT: 21px; 
}
#tabbar-div P {
	MARGIN: 1px 0px 0px
}
.tab-front {
	BORDER-RIGHT: #335b64 2px solid; PADDING-RIGHT: 15px; PADDING-LEFT: 18px; FONT-WEIGHT: bold; BACKGROUND: #80bdcb; PADDING-BOTTOM: 4px; CURSOR: pointer; LINE-HEIGHT: 20px; PADDING-TOP: 4px
}
.tab-back {
	PADDING-RIGHT: 15px; PADDING-LEFT: 18px; PADDING-BOTTOM: 4px; CURSOR: pointer; COLOR: #f4fafb; LINE-HEIGHT: 20px; PADDING-TOP: 4px
}
.tab-hover {
	PADDING-RIGHT: 15px; PADDING-LEFT: 18px; BACKGROUND: #2f9db5; PADDING-BOTTOM: 4px; CURSOR: pointer; COLOR: #f4fafb; LINE-HEIGHT: 20px; PADDING-TOP: 4px
}
#top-div {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: #bbdde5; PADDING-BOTTOM: 2px; MARGIN: 5px; PADDING-TOP: 3px; TEXT-ALIGN: center
}
#main-div {
	border:#AEC8F7 solid 1px; PADDING-LEFT: 5px; BACKGROUND: #fff; PADDING-BOTTOM: 5px; MARGIN: 5px; PADDING-TOP: 5px; 
}
#menu-list {
	MARGIN: 0px;
	height:520px;
	padding: 0px;
}
#menu-list UL {
	PADDING-RIGHT: 0px;
	PADDING-LEFT: 0px;
	PADDING-BOTTOM: 0px;
	MARGIN: 0px;
	COLOR: #009;
	PADDING-TOP: 0px;
	LIST-STYLE-TYPE: none
}
#menu-list LI {
	PADDING-LEFT: 16px; CURSOR: pointer; LINE-HEIGHT: 16px
}
#main-div A:visited {
	
}
#menu-list A:link {
	
}
#menu-list A:hover {
	
}
#menu-list A:active {
	COLOR: #000099
}
.explode {
	FONT-WEIGHT: bold; BACKGROUND: url(images/menu_minus.gif) no-repeat 0px 3px; 
}
.collapse {
	FONT-WEIGHT: bold; BACKGROUND: url(images/menu_plus.gif) no-repeat 0px 3px
}
.menu-item {
	FONT-WEIGHT: normal; BACKGROUND: url(images/menu_arrow.gif) no-repeat 0px 3px
}
#help-title {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; MARGIN: 5px 0px; COLOR: #000080; PADDING-TOP: 0px
}
#help-content {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
.tips {
	COLOR: #cc0000
}
.link {
	COLOR: #000099
}
</style>
<div id="main-div">
<div id="menu-list">
<ul>

		<?php
		if(($currAdmin->Power & 2047) == 2047)
		{
			$m = new Mould(array("MID"=>0));
			$moulds = $m->children();
			if(count($moulds) > 0)
			{
				for($i = 0;$i <count($moulds); $i++)
				{
					$children = $moulds[$i]->children();
					if(count($children) > 0)
					{
						echo '<li class="collapse">
		    <span onclick="if(this.parentNode.className==\'collapse\'){this.parentNode.className=\'explode\';document.getElementById(\'m_'.$moulds[$i]->MID.'\').style.display=\'\'}else{this.parentNode.className=\'collapse\';document.getElementById(\'m_'.$moulds[$i]->MID.'\').style.display=\'none\'}">'.$moulds[$i]->MName.'</span>        
			<ul id="m_'.$moulds[$i]->MID.'" style="display:none">
		            ';
						foreach($children as $child)
						{
							echo '<li class="menu-item"><a href="'.$child->MUrl.'" target="main">'.$child->MName.'</a></li>';
						}
						echo '</ul></li>';
					}
					else 
					{
							echo '<li class="menu-item"><a href="'.$moulds[$i]->MUrl.'" target="main">'.$moulds[$i]->MName.'</a></li>
		';				
					}
				}
			}
		}
		else
		{
			$Ms = $currAdmin->CPower();
			
			for($i = 0; $i < count($Ms); $i++)
			{
				if($Ms[$i]['MUrl'])
				echo "<li class=\"explode\"><a href=\"{$Ms[$i]['MUrl']}\" target=\"main\">{$Ms[$i][MName]}</a></li>\n";
				else
				echo "<li class=\"explode\">{$Ms[$i][MName]}</li>\n";
			}
		}
		?>
  <!--li class="explode">模块管理   </li>
  <li class="explode">模板管理   </li>
  <li class="explode" key="04_order" name="menu">
    内容管理        <ul>
          <li class="menu-item"><a href="#" target="main-frame">内容页</a></li>
          <li class="menu-item"><a href="#" target="main-frame">首页</a></li>
          <li class="menu-item"><a href="#" target="main-frame">首页焦点</a></li>
            </ul>
      </li>
  <li class="explode" >资讯录入</li>
  <li class="explode" >管理员管理</li>
  <li class="explode" >文件管理</li--> 
</ul>
</div>
<!--ul>
<li>+<a href="templateList.php" target="main">模板列表</a></li>
<?php
foreach($Templates as $template)
{
echo "<li> |-<a href=\"bin/docList_{$template->TID}.php?TID={$template->TID}\" target=\"main\">{$template->TName}</a></li>";
}
?>
<li>+<a href="mould.php" target="main">模块</a></li>
<li>+<a href="admin.php" target="main">管理员</a></li>
</ul-->
<div id="help-div" style="display:none">
<h1 id="help-title"></h1>
<div id="help-content"></div>
</div>
</div>

<?php
include("inc/foot.php");
?>